home *** CD-ROM | disk | FTP | other *** search
/ Light ROM 1 / LIGHT-ROM 1 (Amiga Library Services)(1994).iso / ffdisks / d899.lha / GoodDouble / ReadMe < prev    next >
Text File  |  1993-07-05  |  3KB  |  62 lines

  1.  
  2.                         ReadMe for GoodClick v0.3
  3.  
  4. This is a function (in two versions) and a couple of macros which (in my
  5. opinion), make Intuition programming a little easier. They recognize namely
  6. double clicks with ANY mouse-button, taking as parameters ONLY the CURRENT
  7. seconds & micros. They remembers by itself their previous values. You should
  8. call the appropriate macros for EVERY MOUSEBUTTON event you are likely to
  9. receive, even if you are not very interested in e.g. double-clicks with the
  10. right button, if you don't want subtle (?) errors in double-click
  11. recognition. There might be too much of them -- the reason is that if you
  12. give Intuition for example left-right-left in even very quick tact, it still
  13. shouldn't be treated as a real double-click. And it won't be treated as such
  14. by this package, but this right button must be fed to the macros/functions as
  15. well. Get it?
  16.  
  17. The function (and macros) returns TRUE if the time you give it was inside the
  18. double-click time-distance from the last time it got the SAME button; and NO
  19. OTHER button was clicked IN BETWEEN. Otherwise it return FALSE. This routine
  20. understands all the three available on the Amiga mouse-buttons, i.e. the
  21. MIDDLE one too.
  22.  
  23. More formally,
  24.  
  25.     these are the macros #defined in "good_double.h":
  26.  
  27.         BOOL = LeftDouble( ULONG seconds, ULONG micros )
  28.         BOOL = MiddleDouble( ULONG seconds, ULONG micros )
  29.         BOOL = RightDouble( ULONG seconds, ULONG micros )
  30.  
  31.     and they all call a function like that:
  32.  
  33.         BOOL = GoodDouble( LONG button_num, ULONG seconds, ULONG micros )
  34.  
  35.         where
  36.  
  37.             button_num =    0   for the left,
  38.                             1   for the middle
  39.                             2   for right button
  40.  
  41. The source-code in C, objects, and an example program are included. Included
  42. is also a more stupid (and c. 200 bytes smaller) version that doesn't know
  43. anything about the MIDDLE-button.
  44.  
  45. This whole stuff compiles cleanly with DICE. I tried it even with Lattice
  46. v5.10, it compiles cleanly as well, though the test program spits the
  47. messages AFTER it has terminated! I'm certainly not Lattice programmer
  48. myself, and every such person will certainly be able fix this in seconds...
  49. My source looks like a portable C to me (except for the DICE' '__regargs'
  50. which are taken hand of automatically by the preprocessor). The objects
  51. provided here are produced by DICE, and take non-registerized function-
  52. parameters, so you should be able to link them with anything. If you must or
  53. want to recompile them and your compiler doesn't support registerized
  54. function arguments, keep GDC_REGARGS in good_double.h #undefine'd.
  55.  
  56.  
  57.                        this is Public Domain, enjoy s'il vous plaît!
  58.  
  59.  
  60.                                             Piotr Obminski
  61.  
  62.